package com.group3.hospital.service.impl;

import com.group3.hospital.bean.HealthKnows;
import com.group3.hospital.mapper.HealthMapper;
import com.group3.hospital.service.HealthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 尚硅谷
 * @create 2021/12/31
 */
@Service
public class HealthServiceImpl implements HealthService {

    @Resource
    private HealthMapper healthMapper;

    @Override
    public void addHealthKnow(HealthKnows healthKnows) throws Exception {
        healthMapper.addHealthKnow(healthKnows);
    }

    @Override
    public List<HealthKnows> queryAll() throws Exception {
        return healthMapper.queryAll();
    }

    @Override
    public Integer queryCount() throws Exception {
        return healthMapper.queryCount();
    }

    @Override
    public List<HealthKnows> queryByPage(Integer page) throws Exception {
        return healthMapper.queryByPage(page);
    }

    @Override
    public void deleteById(Integer id) throws Exception {
        healthMapper.deleteById(id);
    }

    @Override
    public HealthKnows selectByHealthId(Integer id) throws Exception {
        return healthMapper.selectByHealthId(id);
    }


}
